// Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov  Date: 2007-9-15 18:54:05

// Decompiler options: packimports(3) fieldsfirst ansi 
// Source File Name:   mu.java

package com.zelix;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.*;

// Referenced classes of package com.zelix:
//            iu, wg, wb, dc, 
//            dp, ep, lp, n5, 
//            is, zs, ot, kt, 
//            sx, gt, lt, pt, 
//            jb, qy, yg

public abstract class mu extends iu {

    String s;
    String t;
    String u;
    private static String z[];

    mu(lt lt, zs zs1, zs zs2, pt apt[]) {
        super(lt, zs1, zs2, apt);
        V();
    }

    mu(kt kt1, jb jb)
            throws IOException, dc {
        super(kt1, jb);
        V();
    }

    mu(kt kt1, jb jb, qy qy, PrintWriter printwriter)
            throws IOException, dc {
        super(kt1, jb, qy, printwriter);
        V();
    }

    public static mu a(mu amu[], yg yg) {
        HashMap hashmap;
        int i;
        String as[];
        int j;
        int i1;
        i1 = kt.i;
        if (amu == null || amu.length == 0)
            return null;
        if (amu.length == 1)
            return amu[0];
        hashmap = new HashMap();
        i = 0;
        as = new String[amu.length];
        for (j = 0; j < amu.length; j++) {
            String s1;
            int l;
            s1 = amu[j].c();
            l = 0;
            while (s1.charAt(l) == '[') {
                l++;
            }

            if (j == 0) {
                i = l;
                if (l != i)
                    return null;
            }
            if (l > 0)
                s1 = s1.substring(l);
            if (s1.endsWith(";"))
                s1 = s1.substring(1, s1.length() - 1);
            as[j] = s1;
            Object obj = hashmap.put(s1, amu[j]);
        }


        int k;
        try {
            a(as, yg);
        } catch (wb wb) {
            wb.printStackTrace();
            return null;
        }
        for (k = 0; k < as.length - 1; k++) {
            if (!yg.a(as[k], as[k + 1]) && !yg.b(as[k], as[k + 1]))
                return null;
        }
        return (mu) hashmap.get(as[0]);
    }

    private static void a(String as[], yg yg)
            throws wb {
        int i;
        int l;
        l = kt.i;
        for (i = 0; i < as.length - 1; i++) {
            int j;
            String s1;
            int k;
            j = i;
            s1 = as[i];
            for (k = i + 1; k < as.length; k++) {
                String s2 = as[k];
                if (yg.a(s2, s1) || yg.b(s2, s1)) {
                    j = k;
                    s1 = s2;
                }
            }
            if (j > i) {
                as[j] = as[i];
                as[i] = s1;
            }
        }

    }

    public String q() {
        return u;
    }

    public String d(Hashtable hashtable) {
        return u() + dp.b(R(), hashtable);
    }

    public Vector M() {
        Vector vector = is.c(u);
        return vector;
    }

    public String a() {
        return is.a(u, false, true);
    }

    public String r() {
        return u() + q();
    }

    protected String s() {
        return t;
    }

    public String N() {
        return u() + q();
    }

    public dp O() {
        return new dp(w(), q());
    }

    public lp P() {
        return new lp(v(), w(), q());
    }

    public n5 b() {
        return new n5(w(), q());
    }

    public String u() {
        if (s.equals(z[1]))
            return o();
        if (s.equals(z[0]))
            return z[2];
        else
            return s;
    }

    public Vector Q() {
        Vector vector;
        int i;
        int j;
        int k;
        k = kt.i;
        vector = is.b(u);
        i = vector.size();
        for (j = 0; j < i; j++) {
            String s1 = (String) vector.elementAt(j);
            if (s1.equals("B") || s1.equals("C") || s1.equals("S") || s1.equals("Z"))
                vector.setElementAt("I", j);
        }

        return vector;

    }

    public String R() {
        int i = u.lastIndexOf(')');
        return u.substring(0, i + 1);
    }

    public final String S() {
        return s + u;
    }

    public String w() {
        return s;
    }

    public String c() {
        int i = u.lastIndexOf(')');
        return u.substring(i + 1);
    }

    public final boolean b() {
        return super.k.b();
    }

    public final boolean T() {
        return s.equals(z[0]);
    }

    public final boolean U() {
        return s.equals(z[1]);
    }

    public final boolean d() {
        return super.k.e();
    }

    void a(ep ep1, Hashtable hashtable, boolean flag, lt lt) {
        if (!s.equals(z[1]) && !s.equals(z[0]) && !D() && (x() || !A())) {
            dp dp1 = O();
            Object obj = hashtable.put(dp1, lt);
            if (obj != null)
                hashtable.put(dp1, obj);
            if (!flag)
                ep1.a(dp1);
        }
    }

    private void V() {
        if (H()) {
            u = super.m.b();
            s = super.l.b();
            t = u().toLowerCase();
        }
    }

    public boolean a(mu mu1) {
        return s.equals(mu1.s) && u.equals(mu1.u) && j().equals(mu1.j());
    }

    public final void e(boolean flag) {
        super.k.d(flag);
    }

    protected void a(String s1) {
        u = s1;
        super.a(s1);
    }

    public void b(String s1) {
        label0:
        {
            if (U()) {
                e();
                a(new sx(0), this, null);
                if (kt.i == 0)
                    break label0;
            }
            s = s1;
            super.b(s1);
        }
        t = u().toLowerCase();
    }

    public final void f(boolean flag) {
        super.k.g(flag);
    }

    private static String z(char[] chs) {
        for (int i = 0; i < chs.length; i++) {
            byte key = 0;
            switch (i % 5) {
                case 0:
                    key = 0x1a;
                    break;
                case 1:
                    key = 35;
                    break;
                case 2:
                    key = 117;
                    break;
                case 3:
                    key = 15;
                    break;
                default:
                    key = 106;
                    break;
            }
            chs[i] ^= key;
        }
        return new String(chs).intern();
    }

    static {
        String as[];
        as = new String[3];
        as[0] = "&@\031f\004sWK";
        as[1] = "&J\033f\036$";
        as[2] = "iW\024{\003y";
        for (int i = 0; i < as.length; i++) {
            as[i] = z(as[i].toCharArray());
        }
        z = as;
    }
}